﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
using System.Windows.Forms;

namespace WIKID
{
    public partial class ResultMessageBox : Form
    {

        static ResultMessageBox newMessageBox;
        static string Button_id;

        public ResultMessageBox()
        {
            InitializeComponent();
        }

        public static string ShowBox(string txtMessage)
        {
            newMessageBox = new ResultMessageBox();
            newMessageBox.lblMessage.Text = txtMessage;

            newMessageBox.lblResult.Visible = false;
            newMessageBox.lblYourResult.Visible = false;
            newMessageBox.lblScore.Visible = false;
            newMessageBox.lblYourScore.Visible = false;

            newMessageBox.ShowDialog();
            return Button_id;
        }

        public static string Show(string txtMessage, string txtTitle, string txtResult, string txtScore, Image image)
        {
            newMessageBox = new ResultMessageBox();
            newMessageBox.lblTitle.Text = txtTitle;
            newMessageBox.lblMessage.Text = txtMessage;
            newMessageBox.lblResult.Text = txtResult;
            newMessageBox.lblScore.Text = txtScore;
            newMessageBox.pbxEmoticon.Image = image;
            newMessageBox.ShowDialog();
            return Button_id;
        }

        private void MyMessageBox_Load(object sender, EventArgs e)
        {

        }

        private void MyMessageBox_Paint(object sender, PaintEventArgs e)
        {
            Graphics mGraphics = e.Graphics;
            Pen pen1 = new Pen(Color.FromArgb(96, 155, 173), 1);

            Rectangle Area1 = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
            LinearGradientBrush LGB = new LinearGradientBrush(Area1, Color.FromArgb(96, 155, 173), Color.FromArgb(245, 251, 251), LinearGradientMode.Vertical);
            mGraphics.FillRectangle(LGB, Area1);
            mGraphics.DrawRectangle(pen1, Area1);
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            Button_id = "1";
            newMessageBox.Dispose();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Button_id = "2";
            newMessageBox.Dispose();
        }

        private void lblResult_Click(object sender, EventArgs e)
        {

        }

    }
}